﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace ChuongtrinhTracnghiem.Model
{
    class TruyvanSQL
    {

        public TruyvanSQL()
        {
            Model.Ketnoi.Thuchienketnoi();
        }
        public void SQL(string s)
        {
            try
            {
                SqlCommand cm = new SqlCommand(s, Model.Ketnoi.con);
                cm.ExecuteNonQuery();
                Model.Ketnoi.Boketnoi();
            }
            catch 
            {
            MessageBox.Show("Truy vấn không thành công");
            }
        }

    }
}
